package com.kws.system.api.factory;

import com.kws.system.api.RemoteCompanyMessageService;
import com.kws.system.api.RemoteUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author :yxy
 * @date : 2024/10/31
 */
@Component
public class RemoteCompanyMessageFactory implements FallbackFactory<RemoteCompanyMessageService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class);

    @Override
    public RemoteCompanyMessageService create(Throwable throwable) {
        log.error("用户服务调用失败:{}", throwable.getMessage());
        return null;
    }
}
